package com.like.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import com.like.adapter.EditListViewAdapter;
import com.like.fragment.BaseFragment;
import com.like.hospitalworld.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

@ContentView(R.layout.fragment_edit)
public class OfflineEditFragment extends BaseFragment {
    @ViewInject(R.id.edit_list)
    private ListView listView;

    private OnEditClickListener editClickListener;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onCreateView() {
        super.onCreateView();
        editClickListener = (OnEditClickListener) getActivity();
        EditListViewAdapter listViewAdapter = new EditListViewAdapter(getActivity());
        listView.setAdapter(listViewAdapter);
    }

    @Event(R.id.edit_ll)
    private void editClick(View v) {
        editClickListener.editClick();
    }

    public interface OnEditClickListener {
        void editClick();
    }
}

